<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"></script>
<script>
function assert(x) {
  if (!x) throw Error("assertion failed");
}
require(["../index"], function(sdk) {
  const { BINARYEN_VERSION, LONG_VERSION, ASSEMBLYSCRIPT_VERSION, binaryen, long, assemblyscript, asc } = sdk;
  assert(typeof BINARYEN_VERSION === "string");
  assert(typeof LONG_VERSION === "string");
  assert(typeof ASSEMBLYSCRIPT_VERSION === "string");
  console.log("Binaryen@" + BINARYEN_VERSION);
  console.log("Long@" + LONG_VERSION);
  console.log("AssemblyScript@" + ASSEMBLYSCRIPT_VERSION);
  assert(typeof binaryen === "object" && binaryen && typeof binaryen._BinaryenTypeNone === "function");
  assert(typeof long === "function" && long && typeof long.fromInt === "function");
  assert(typeof assemblyscript === "object" && assemblyscript && typeof assemblyscript.parse === "function");
  assert(typeof asc === "object" && asc && typeof asc.main === "function");
  asc.ready.then(() => console.log("ready", sdk));
});
</script>
